import requests
import unittest
from config.Config import *
from api.Api import Api

class Cms_Login(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.session = requests.Session()
        Api().set_session(cls.session)

    def test_loging(self):
        api_ele = ['post',cms_login_url,cms_login_data,cms_login_headers]
        Api().send_api(api_ele=api_ele)
        self.value = Api().api_json_assert()
        assert self.value['msg'] == '登录成功！'
if __name__ == '__main__':
    unittest.main(verbosity=2)